Copyright (c) 1991-1993 Borland International, Inc. All Rights Reserved. RUNNING dBASE DOS APPLICATIONS ------------------------------ Most dBASE III PLUS and dBASE IV programs run in BladeRunner with no changes required to the source code. However, some more complex applications may require a few enhancements. This paper points out topics that may affect your programs. Contents -------- I. Preparation II. Supported File Types III. Configuration for Windows IV. Language Enhancements V. Non-operational Commands and Functions VI. Printer Driver References VII. Data Formatting Defaults VIII. Conflicts with Windows Keystrokes IX. Error Code Differences Preparation ----------- Before running your dBASE DOS application in Bladerunner, you should: 1. Become familiar with the Bladerunner application environment. This paper (and others included with this Alpha release) will help you with this type of information, but you'll also want to explore Bladerunner to learn as much as you can. 2. Check that the application files you bring over include just dBASE source code files, tables, and other associated dBASE file types. 3. Update your Bladerunner DBASEWIN.INI configuration file, if necessary, to better support your application (you'll find more on this subject below). 4. Look for certain language enhancements that may affect your application's behavior and update your source code if necessary (this is also discussed below). Supported File Types -------------------- Bladerunner reads your dBASE III PLUS and dBASE IV source code files and compiles them into a new object file format with the .PRO extension. Bladerunner uses the same file formats for tables and indexes (.DBF, .DBT, .MDX, .NDX) as dBASE IV. Bladerunner also supports .PRG and .FMT source code files. Configuration for Windows ------------------------- The Windows environment provides standard resources, such as printer and screen drivers, that Windows applications share. Bladerunner also supports these drivers, making it easy for you to write device-independent applications. Some dBASE DOS applications rely on specific settings in the CONFIG.DB configuration file, but Bladerunner doesn't read CONFIG.DB. Instead, Bladerunner uses an .INI file, DBASEWIN.INI, for configuration. If your application relies on CONFIG.DB settings, you may need to adjust your code or add equivalent settings to DBASEWIN.INI. Some CONFIG.DB settings have equivalents in DBASEWIN.INI, but most are unnecessary in the Windows environment; or, you set them through the Windows Control Panel instead of in CONFIG.DB, AUTOEXEC.BAT, CONFIG.SYS, or a special-purpose DOS batch file. Here are some CONFIG.DB settings, and their Bladerunner equivalents. CONFIG.DB Setting Bladerunner Equivalent --------------------------------------------------------- PRINTER Set by Windows printer driver. PDRIVER Set by Windows printer driver. PRINTER FONT Set in [Font] section of .INI file Language Enhancements --------------------- Several Bladerunner language elements have been enhanced to better suit the Windows environment. Please review the online Language Reference provided with this Alpha release for more information. Non-operational Commands and Functions -------------------------------------- Some dBASE commands and functions are inapplicable in the Windows environment. Bladerunner simply ignores these commands, without generating errors. Here is the current list of non-operational (no-op) language elements: ASSIST CALL CALL() CREATE APPLICATION DEXPORT DGEN() DISPLAY HISTORY DOSINT FIXED() HIDE MOUSE IN() INTRO ISMARKED() LIST HISTORY LOAD MODIFY APPLICATION OUT RELEASE MODULES RESET SET SET ADL SET CLOCK SET CLOCK TO SET COMPATIBLE SET CURSOR SET CURSORMOVE SET DBTRAP SET DEBUG SET DISPLAY SET GRAPHPRINT SET HISTORY SET HISTORY TO SET HOURS SET INSTRUCT SET MOUSE SET PAUSE SET PROMPT SET RETRACE SET SCOREBOARD SET SQL SET SWAPPING SET TITLE SHOW MOUSE Printer Driver References ------------------------- If your program references dBASE IV printer driver (.PR2) files by setting the _pdriver system memory variable, you need to update the variable with the corresponding Windows printer driver. The Language Reference entry for _pdriver describes the new syntax. The following example shows how to update the _pdriver syntax for a popular laser printer. Change _pdriver = HPLAS260.PR2 to _pdriver = "HPPCL", "HP Laser Jet Series II" The _pdriver variable is the only print-related system memory variable you need to change. You should also read the Alpha paper titled "Streaming Output in Bladerunner" for more information on printing. Data Formatting Defaults ------------------------ Bladerunner has defaults for date, time, and number formatting, which affect these SET commands: CENTURY CURRENCY DATE MARK POINT SEPARATOR TIME Bladerunner gets these settings from the Windows Control Panel. Settings in the DBASEWIN.INI file override the Control Panel defaults. If your program relies on specific formatting, set the values in the .INI file, or issue the necessary SET commands in your program. Conflicts with Windows Keystrokes --------------------------------- Certain keystroke combinations are common to all Windows applications. For instance, Alt-F4 closes the active window or dialog box. Your application should not map other behavior to these reserved key combinations. Error Code Differences ---------------------- Several runtime error numbers have changed. These changes are unavoidable in transitioning to the Windows environment. If your program traps specific runtime error numbers, you may need to update them.